#!/bin/bash

set -e
set -x

# yum -y install --downloadonly --downloaddir=clickhouse-server-rpm clickhouse-server 
bypy download clickhouse-server-rpm.tgz
tar xf clickhouse-server-rpm.tgz
yum -y --disablerepo='*' localinstall clickhouse-server-rpm/*.rpm
systemctl daemon-reload
systemctl start clickhouse-server
clickhouse-client --query "SHOW DATABASES"

set +x
set +e